package token

import "strconv"

type Token interface {
	GetLineNumber() int
	GetText() string
}

type NumToken struct {
	LineNumber int
	Value      int
}

func (t *NumToken) GetLineNumber() int {
	return t.LineNumber
}

func (t *NumToken) GetText() string {
	return strconv.Itoa(t.Value)
}

type IdToken struct {
	LineNumber int
	Text       string
}

func (t *IdToken) GetLineNumber() int {
	return t.LineNumber
}

func (t *IdToken) GetText() string {
	return t.Text
}

type StrToken struct {
	LineNumber int
	Literal    string
}

func (t *StrToken) GetLineNumber() int {
	return t.LineNumber
}

func (t *StrToken) GetText() string {
	return t.Literal
}

type EOFToken struct {
	LineNumber int
}

func (t *EOFToken) GetLineNumber() int {
	return t.LineNumber
}

func (t *EOFToken) GetText() string {
	return "EOF"
}
